shortcut 434}{"Main Heading" on}{"Box heading" on}Notes on setting up !Printers
{"Box heading" off}James Munday
{"Main Heading" off}{"Heading" on}Formfeeds, DeskEdit and Auto Tear-Off
{"Heading" off}I have very recently up-dated to RISC OS 3.1, and I agree with Tim Nicholson (Vol 6.10 p43) as to the power of the new !Printers. In particular the !PrintEdit utility is basically very simple to use once you get used to the steps involved.
I make a lot of use of !DeskEdit for listing programs, using A4 fanfold paper. I quickly experienced the irritation of unwanted form-feeds. This is well known, and the fudge of setting a very large page height using the !Printers Page Sizes option worked as expected. However the Auto Tear-off on my FX-1050 printer did not work, and this is particularly irritating with the 1050 since the cutting edge is a long way from the print head. Both problems are easily cured by small alterations to, in my case, the FX-85 printer definition file. This can be done using !PrintEdit, but we do have to be careful about saving modified definition files. It is quite easy to not actually save the alterations that are made! {\153} and this might explain the problems that Mick Day (Vol 6.12 pp57) experienced.
{"Heading" on}Editors and Page Formats
{"Heading" off}In what follows I imply no critiscism of editors such as !Edit. On the contrary, the !Edit application in RISC OS3 is very much improved over its predecesser, and very useful for smaller tasks.
But !Edit has no facility for page formatting, and instead relies upon !Printers for this.
There is nothing wrong with this {\153} it is what !Printers is designed to cope with. Nevertheless, for some more complicated tasks, I prefer to use an editor such as !DeskEdit, which does have margin and page formatting as options within the editor.
When printing is innitiated from within !DeskEdit say, then page formatting is done with suitable spaces and linefeeds in the output text, and as such does not rely upon the page format facilities of !Printers. It does mean though that there can be an inconsistency among editors in matters of page formatting, among other things.
The solution within !Printers is that of easily configurable printer definition files, and there is nothing wrong with having as many as we need for special purposes.
Indeed, this is a beauty of !Printers, and the way in which complete device independence is maintained so far as the printer and applications software are concerned.
{"Heading" on}Page Length and formfeeds
{"Heading" off}The required page length is set using the !Printers Page Sizes option from the Printers Icon menu, for the chosen paper format.
This is used by !Printers, to configure the printer form length at the start of a document.
This should be done by !Printers and not by applications {\153} otherwise we may lose device independence.
Then, during printing, !Printers will send a {\144}logical{\145} formfeed in accordance with the page length and margin settings. However, the {\144}physical{\145} code for the formfeed is configurable in the printer definition file. The simple fudge for Editors such as !DeskEdit, is just to set the !Printers page length so large that a formfeed is never actually sent.
This works well enough with simple printers, but for those with auto tear-off it is less than ideal {\153} this is because the printer is not configured with a suitable form length.
A better solution is to reconfigure the {\144}physical{\145} formfeed code in the printer definition file, and subsequently to set the correct page length (with zero margins) in the !Printers page size.
{"Heading" on}Auto Tear-Offs and Printer Resets
{"Heading" off}Apart from needing a correct form length setting, a printer auto tear-off cannot work if the printer is reset at the end of a document, and most of the available printer definitions have a reset code as an end of job requirement. Incidentally, it is the same with 1stWord+ Pdrivers {\153} so with the Archemedes, it is possible for us beginners to never see what auto tear-off is or does!.
Anyway, the answer is to alter the end of job definitions in the printer definition file.
{"Heading" on}Printer Definitions and !PrintEdit
{"Heading" off}At risk of being a little long winded, I will go through the steps of modifying a printer definition file using !PrintEdit. As I have said, it is basically very simple once you have done it {\153} but a step by step guide may help other beginners to avoid some of the grief and despair that I experienced initially!. I will deal with matters affecting auto tear-off and formfeeds.
See also, Tim Nicholson{\145}s article for other general points and aspects.
Firstly double-click on !PrintEdit to bring up the {\144}Printer Definition Editor{\145} window.
Now from the Printers directory in APPS2, drag a suitable definition file into the window ( in my case Epson FX-85).
If the text modes section is greyed out then click on the small right hand boxes to bring them up.
Then select on , say, {\144}Text-No Highlights{\145} to bring up a {\144}Text-No Highlights{\145} window.
The edit now requires three small steps:-
(1) To correct the formfeed problem, go to {\144}Do FormFeed:{\145} and delete all code (in my case just 12).
(2) To correct the reset problem, go to {\144}Text End of Job:{\145} and delete the reset code (in my case 27,{\148}@{\149}), and replace this with some suitable termination that does not involve a reset. For example, for the FX-85, 27,{\148}!{\149},0,27,{\148}x{\149},0 puts the printer back to a basic draft standard mode configuration, and is suitable for page formatted printing that is innitiated from within an application such as !DeskEdit. But see a later paragraph for more detail of suitable termination code requirements.
(3) Finally, and most importantly, scroll to the top of the page and click on the OK icon before closing the {\144}Text-No Highlights{\145} window.
Failure to do this would mean that the changes will not be implemented.
Now, these three steps can be repeated for Text Draft and NLQ highlight entries as required.
To complete the edit, change the names at Printer Type: and Printer Name: entries in the Printer Definition Editor window. (I chose {\144}FX-85 DeskEdit{\145}, and {\144}FX-85D{\145} for these). Lastly, click on Menu in the Printer Definition Editor window and save the modified file under a different name (eg, I chose FX-85D instead of the original FX-85).
A useful hint at this stage is to double-click on !PrintEdit again and drag your modified file into it.
You can check that you have actually managed to make the required alterations!.
{"Heading" on}Graphics Pages
{"Heading" off}Apart from the paper offsets, which Tim Nicholson has dealt with in detail in his article, the only edits to the graphics pages that I have done have been concerned with auto tear-off. For this there are a few further steps to take before saving a modified printer definition file. Working from the Printer Definition Editor window, these steps are:-
(4) Click on the arrow icon to the right of {\144}Graphics modes:{\145} to bring up a {\144}Graphics{\145} menu. Then click on a resolution of interest to bring up a {\144}Graphics Mode{\145} window.
(5) In the {\144}Graphics Mode{\145} window scroll down to a {\144}Page end:{\145} entry and delete the reset code there. Replace this with a similar termination code as for step (2) above. However, we need to include codes to reset the line space, otherwise a text page following a Graphics page, will not print properly. For some reason, the code order is important if the auto tear-off is not to be disabled {\153} I used 27,{\148}2{\149},13,27,{\148}!{\149},0,27,{\148}x{\149},0 for my FX-1050.
(6) Again, and most importantly as step (3){\160}above, scroll to the top of the page and click on the OK icon before closing the {\144}Graphics Mode{\145} window.
As before, failure to do this would mean that the changes will not be implemented.
Unfortunately these steps must be repeated for all of the resolutions in the {\144}Graphics{\145} menu, and this is a bit tedious if you have retained all of the available resolutions. Well, I said it was easy {\153} I didn{\145}t say it was fun.
{"Heading" on}More on Termination Codes for Text Modes
{"Heading" off}There are a number of ways in which we can print {\144}text{\145} files, and I mean this in general fashion and not a specific reference to file types.
Broadly we can print {\144}Direct{\145} by dragging a file to the !Printers icon, or it may be {\144}Indirect{\145} by innitiating printing from within applications such as !Edit, or !DeskEdit. With RISC OS3.1 we can also print !1stWord+ files {\144}direct{\145}. None of this matters unless we are concerned with enabing auto tear-off, by changing Reset codes to some other termination. Again, broadly there are two cases to be considered. Firstly text that is effectively {\144}Simple{\145}, and text that is effectively {\144}Page formatted{\145}.
Files from !Edit are {\144}Simple{\145} whether or not they are printed {\144}Direct{\145} or {\144}Indirect{\145}.
Files from !DeskEdit are {\144}Simple{\145} if they are {\144}Direct{\145}, but {\144}Page formatted{\145} if they are {\144}Indirect{\145}.
Files from !1stWord+ are treated differently depending upon whether or not the !1stWord+ directory has been seen or not. For the {\144}Indirect{\145} case, then the !1stWord+ Pdrivers will be used, and this is of no interest here. Equally, if the !1stWord+ directory has been seen, then the {\144}Direct{\145} case will also use the 1stWord+ Pdrivers.
But otherwise, {\144}Direct{\145} !1stWord+ files appear as {\144}Simple{\145} to !Printers.
From this we can see that {\144}Indirect{\145} !DeskEdit files are really an odd-man-out. As I have said at step (2) above, a termination code 27,{\148}!{\149},27,{\148}x{\149},0
is suitable for {\144}Indirect{\145} !DeskEdit files. But for other cases, in my experience, we need also to add a formfeed code {\153} eg for Epson FX-85, we would use 27,{\148}!{\149},27,{\148}x{\149},0,12
as the termination. For me at least, this leads to a requirement for two Printer Definition files for my FX-1050. One for {\144}Indirect{\145} !DeskEdit, and one for everything else.
But either of them can be used for graphics (Strictly, I only know about !Draw files for sure).
{"Heading" on}Customising Paper Sizes
{"Heading" off}If we load !Printers and then click menu on the Printers Icon, then the {\144}Edit paper sizes...{\145}, {\144}Printer control...{\145}, and {\144}Save choices{\145} menu entries can be used to configure the page formats for each printer definition that is loaded. In particular, we can use {\144}Edit paper sizes...{\145} to customise a page format for a particular definition.
For example, I have two printer definitions installed in !Printers.
Now if I use just just one paper size, say {\144}A4 (generic DP){\145} then I would be continually using the {\144}Edit paper sizes...{\145} option to change text margins.
Instead, it is much nicer to define a new paper size for, in my case, say the !DeskEdit definition {\153} particularly since this only takes up a few bytes of store.
I will go through the steps for doing this, because I did not find the User Guide to be all that clear about it. These steps are:-
(1) Click menu on the !Printers icon to bring up a {\144}Printers{\145} menu.
Now click on {\144}Edit paper sizes...{\145} to bring up a {\144}Paper size{\145} window.
Next, click on the arrow icon to the right of the {\144}Paper size name:{\145} entry, to bring up a menu of Paper sizes.
(2) From the {\144}Paper sizes{\145} menu click on a suitable paper size, in my case say {\144}A4 (generic DP){\145}, to bring up these details in the {\144}Paper sizes{\145} window.
(3) Now to define a new paper size, we must change the name at the {\144}Paper size name:{\145} entry {\153} I chose {\144}A4 (DeskEdit DP){\145} {\153} and alter the other entries as required.
In my case it was only those at {\144}Text margins{\145}- where I put the {\144}Top:{\145}, {\144}Left:{\145}, {\148}Bottom:{\144} and {\145}Right:{\144} settings to zero, while making sure that the {\145}Height:{\144} setting was correct at 70.
(4) Finally click on the OK icon at the bottom right of the {\144}Paper size{\145} window, to save the new paper size. (The User Guide is a little confusing here since on pp72 it show a {\144}Save settings{\145} icon {\153} I do not have this in my Version 0.33 of !Printers).
Now if you were to repeat step (1) above, you should see that the new paper size appears in the {\144}Paper sizes{\145} menu.
(In detail if you were also to look inside the !Printers directory, you would also see a new file {\144}PaperRW{\145}, which contains the details of the new paper size). At this stage, the final steps to configure a printer definition are:-
(5) Again click menu on the Printers Icon, and this time click on {\144}Printer control...{\145} to bring up a {\144}Printer control{\145} window. Now click menu on the required printer definition {\153} in my case {\144}FX-85 DeskEdit{\145}, to bring up a {\144}Printers{\145} menu.
From this select the {\144}Configure...{\145} entry, to bring up a {\144}Bit image printer configuration{\145} window.
Now click on the arrow icon to the right of {\144}Paper:{\145} to bring up a {\144}Paper sizes{\145} menu, and click on the new paper size -ie in my case {\144}A4 (DeskEdit DP){\145}.
Check the Printer and Text printing options as required, and end by clicking on the OK icon.
(6) Finally, once more click menu on the Printers Icon, and this time select {\144}Save choices{\145}.
In this sort of way, we can have any number of printer definitions, all with their own page set-ups, and this is very convenient. Only one definition at a time need be active, and if we {\144}Save choices{\145} for this then this will be the default when !Printers is loaded.
{"Heading" on}Loading Modified Definitions
{"Heading" off}Tim Nickolson{\145}s warning about loading modified definitions into !printers is a point well made.
!Printers can be very reluctant to give up an old definition, even though we think we have removed it. As Tim Nicholson says, it is desireable to at least change the {\144}Printer type:{\145} name of a modified definition file before you save it.
Otherwise, when you subsequently drag it into the {\144}Printer control{\145} window, !Printers may still load the unmodified definition.
The name change is good practice anyway, because you can then see straight away that it is indeed the modified file that has been loaded into !Printers.
Some precautionary steps that I have adopted are as follows {\153} but first remember to keep a back-up of your existing !printers, and work with a copy until everything is all tested.
(1) Load !Printers in the usual way, and select {\144}Printer control...{\145} from the !Printers icon menu.
Then from the {\144}Printer control{\145} window select menu on any existing definitions, and either {\144}Remove{\145} them if they are to be modified, or make them {\144}Inactive{\145} otherwise.
(2) Next, from the !Printers icon menu select {\144}Save choices{\145} and {\144}Quit{\145}.
(3) Now re-load !Printers, and you should be able to drag modified definitions into the {\144}Printer control{\145} window, and configure them with no ensuing troubles, even if the {\144}Printer type:{\145} name has not been changed.
It is arguable whether or not these precautionary steps are really necessary for just loading a modified definition file, but they may save a lot of trouble if you happen to delete old definition files or customised page sizes, or if you wish to keep the same {\144}Printer type:{\145} name. At one time I got so fouled up that I could not even load !Printers anymore, without all sorts of error messages coming up.
{"Heading" on}In Conclusion
{"Heading" off}In retrospect this does all seem to be trivial and long winded! But I did not find it at all easy to sort out when I first started.
If these notes are helpful to other beginners, then they may have served some useful purpose.
Auto tear-off may well be a bit of a non-problem. I do not know how many printers have it. But the approach that is outlined, is in general good for almost any alterations that are needed to printer definition files.